package com.zbkj.crmeb.store.dto;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;

/**
 * im商品映射对象
 * @Description: 
 * @author daigb
 * @date 2021-04-29
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class ImProductResDTO {
    /**
     * 请求编码
     */
    @JsonProperty(value = "code")
    private String code;

    /**
     * 成功标识
     */
    @JsonProperty(value = "success")
    private Boolean success;
    
    /**
     *响应信息
     */
    @JsonProperty(value = "message")
    private String message;
    
    /**
     * 异常信息
     */
    @JsonProperty(value = "error")
    private String error;
    
    /**
     * 时间戳
     */
    @JsonProperty(value = "timestamp")
    private Long timestamp;

    /**
     * 请求结果
     */
    @JsonProperty(value = "data")
    private List<ImProductDTO> imProductDTOs;
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class ImProductDTO {
        
        /**
         * 商品id
         */
        @JsonProperty(value = "productId")
        private Integer productId;
        
        /**
         * 商品名
         */
        @JsonProperty(value = "name")
        private String name;
        
        /**
         * 商品描述
         */
        @JsonProperty(value = "desc")
        private String description;
        
        /**
         * 货号
         */
        @JsonProperty(value = "designerId")
        private String designerId;
        
        /**
         * 色号
         */
        @JsonProperty(value = "colorCode")
        private String colorCode;
        
        /**
         * 成分
         */
        @JsonProperty(value = "composition")
        private String composition;
        
        /**
         * 规格
         */
        @JsonProperty(value = "dimension")
        private String dimension;
        
        /**
         * 图片
         */
        @JsonProperty(value = "images")
        private List<String> images;
        
        /**
         * 季节
         */
        @JsonProperty(value = "seasonCode")
        private String seasonCode;
        
        /**
         * 商品状态，1：可售，2：不可售
         */
        @JsonProperty(value = "status")
        private Integer status;
        
        /**
         * 品牌
         */
        @JsonProperty(value = "brandId")
        private Integer brandId;
        
        /**
         * 类目Id
         */
        @JsonProperty(value = "categoryId")
        private String categoryId;
        
        /**
         * 更新时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @JsonProperty(value = "updatedTime")
        private Date updateTime;
        
        /**
         * 创建时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @JsonProperty(value = "createdTime")
        private Date createTime;
        
        /**
         * sku
         */
        @JsonProperty(value = "items")
        private List<ImProductItemDTO> items;
        
    }
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class ImProductItemDTO {
        /**
         * skuid
         */
        @JsonProperty(value = "itemId")
        private String itemId;
        
        /**
         * 尺码
         */
        @JsonProperty(value = "size")
        private String size;
        
        /**
         * 吊牌价
         */
        @JsonProperty(value = "retailPrice")
        private BigDecimal retailPrice;
        
        /**
         * 结算价
         */
        @JsonProperty(value = "salePrice")
        private BigDecimal salePrice;
        
        /**
         * 库存数
         */
        @JsonProperty(value = "qty")
        private Integer qty;
        
    }
    
}
